package com.chat.util;

import lombok.Getter;

/**
 * 统一返回结果状态枚举类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "操作成功！"),

    FAIL(201, "操作失败！"),


    USERNAME_NOT_EXISTS(202, "用户名不存在！"),
    PASSWORD_ERROR(202, "密码错误！"),
    OLD_PASSWORD_ERROR(202, "旧密码错误！"),

    FILE_ERROR(202, "文件错误"),
    FILE_NOT_FIND(202, "文件不存在"),

    USERNAME_EXISTS(202, "用户已存在"),
    FRIEND_REQUEST_ERROR(202, "好友请求失败！");
    // 状态码
    private final Integer code;
    // 消息
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
